<!-- 准备修改左侧功能建立的页面 -->
<template>
  <div class="container">
    <div class="content">
      <div class="logo">
        <img src="@/assets/images/talk.png" alt="" />
        <div>价值工程多模态大模型</div>
      </div>
      <el-menu
        default-active="2"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        :collapse="isCollapse"
        active-text-color="#fff"
      >
        <div class="title">
          <div v-if="!isCollapse" style="font-size: 18px; font-weight: 600">
            知识库大模型
          </div>
          <div style="font-size: 30px; text-align: right">
            <i
              :class="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'"
              style="background: none"
              @click="isCollapse = !isCollapse"
            ></i>
          </div>
        </div>
        <el-menu-item index="2">
          <i class="el-icon-plus"></i>
          <span slot="title">信号专业</span>
        </el-menu-item>
      </el-menu>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isCollapse: true,
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style scoped>
.container {
  width: 280px;
  height: 100%;
  font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
}
.content {
  padding: 16px;
}
.logo,
.title {
  width: 240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
}
.logo img {
  width: 28px;
  height: 28px;
}

.el-menu > .el-menu-item {
  background-color: #28c76c;
  text-align: center;
  font-size: 18px;
  border-radius: 8px;
}
.el-menu-vertical-demo:not(.el-menu--collapse) {
  width: 240px;
  height: 100%;
  min-height: 400px;
  border: none;
}
</style>
